// 这是订单模块。有自己的state/actiontype/actioncreator/reducer
const initState = {
  list: [
    {name: 'apple', id: 1},
    {name: 'banana', id: 2}
  ]
}
const actionType = {
  ADDLIST: 'ADDLIST'
}
export const actions = {
  addList: (order)=>({type: actionType.ADDLIST, order: order})
}
const orderReducer = (state=initState, action)=>{
  switch(action.type) {
    case actionType.ADDLIST :
     return {
       ...state,
       list: state.list.concat([action.order])
     }
    default :
     return state
  } 
}
export default orderReducer

